const deviceType = [
  {code: 'BP_DEVICE', codeName: 'mlnx血压', type: 1},
  {code: 'XM_BP', codeName: '星脉血压', type: 1},
  {code: 'ZK_BP', codeName: '正康血压', type: 1},

  {code: 'ECG_DEVICE', codeName: 'mlnx心电', type: 2},
  {code: 'MP_DEVICE', codeName: '多参心电', type: 2},

  {code: 'SPO_DEVICE', codeName: '血氧', type: 3},
  {code: 'SBP_DEVICE', codeName: '带血压血氧', type: 3},
  {code: 'XIAOLOU_SPO_DEVICE', codeName: '小楼血氧', type: 3},
]

export function getBpDeviceType() {
  return deviceType.filter(value => value.type === 1).map(value => {
    return (
      {code: value.code, codeName: value.codeName}
    );
  })
}

export function getSpoDeviceType() {
  return deviceType.filter(value => value.type === 3).map(value => {
    return (
      {code: value.code, codeName: value.codeName}
    );
  })
}

export function getEcgDeviceType() {
  return deviceType.filter(value => value.type === 2).map(value => {
    return (
      {code: value.code, codeName: value.codeName}
    );
  })
}


export function getAllDeviceType() {
  return deviceType.map(value => {
    return (
      {code: value.code, codeName: value.codeName}
    );
  })
}
